home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0040.dms / q0040.adf / top / test.c < prev    next >
C/C++ Source or Header  |  1990-12-06  |  483b  |  27 lines

  1. /* Test file to test the optimser */
  2.  
  3. #include <stdio.h>
  4.  
  5. #define    ISWHITE(c)    ((c) == '\t' || (c) == ' ' || (c) == '\n')
  6.  
  7. fun1(s)
  8.     char *s;
  9.    {/* test the while loop */
  10.     static char label[20];
  11.     register int i;
  12.  
  13.     printf("Enter loop |%s|\n",s);
  14.     i = 0;
  15.     while(*s && !ISWHITE(*s))
  16.         label[i++] = *s++;
  17.     label[i] = '\0';
  18.     printf("leave loop |%s| |%s| %d\n",s,label,i);
  19.     }
  20.  
  21. main(argc,argv)
  22.     int  argc;
  23.     char *argv;
  24.    {
  25.     fun1("L3:    foo\n");
  26.     }
  27.